﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using MusicStore.Silverlight.MusicStoreService;
using MusicStore.Silverlight.Views;
using MusicStore.Silverlight.Infrastructure;
using Structura.Silverlight.Infrastructure.ViewModel;

namespace MusicStore.Silverlight.ViewModels
{
	public interface IAlbumViewModel : IViewModel
	{
		new IAlbumView View { get; }

		/// <summary>
		/// property used for binding
		/// </summary>
		MusicStoreService.Album Album { get; }

		/// <summary>
		/// expose the albums tracks as a paged collection view so we can easily implement custom sorting
		/// </summary>
		PagedCollectionView Tracks { get;}

		/// <summary>
		/// list of genres available
		/// </summary>
		List<string> Genres { get; }

		/// <summary>
		/// get the data from the service or create a new album if 0 is passed in.
		/// the data will be assigned to the 
		/// Album property and becomes the currently handled data
		/// </summary>
		/// <param name="id"></param>
		void GetAlbum(int id);

		void DeleteAlbum();

		void SaveAlbum();

		/// <summary>
		/// add a track tot he list of tracks of the current album
		/// </summary>
		/// <param name="number"></param>
		/// <param name="title"></param>
		/// <param name="duration"></param>
		void AddTrack(int number, string title, string duration);

		/// <summary>
		/// removes a track from the list
		/// </summary>
		/// <param name="track"></param>
		void RemoveTrack(Track track);

		/// <summary>
		/// upload the data for the preview related to the album
		/// </summary>
		/// <param name="filestream"></param>
		void UploadPreviewFile(Stream filestream);
	}
}
